package com.lp.product.exception;

import com.lp.product.enums.ResultEnum;

/**
 * @author LIPENGAK
 * @Description: 类描述
 * @date 2018-10-30 20:03
 */
public class ProductException extends RuntimeException {

    private Integer code;

    public ProductException(String msg, Integer code) {
        super(msg);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum){
        this(resultEnum.getMessage(),resultEnum.getCode());
    }
}
